// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_HR_PERSON_POSITION_APPLICATION
// * CreateDate    : 2012/1/4 15:41:55
// * Creater       : CodeSmith
// * LastChangeDate: 2012/1/4 15:41:55
// * LastChanger   : 2012/1/4 15:41:55
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class HrPersonPositionApplicationEntity : EntityBase
    {
        public HrPersonPositionApplicationTable TableSchema
        {
            get
            {
                return HrPersonPositionApplicationTable.Current;
            }
		}
		
		public HrPersonPositionApplicationEntity()
        {

        }
		
		public HrPersonPositionApplicationEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.OriginalPosition = Convert.ToString(CommonFunctions.ToObject(dr["ORIGINAL_POSITION"]));
			this.ChangedPosition = Convert.ToString(CommonFunctions.ToObject(dr["CHANGED_POSITION"]));
			this.ApplicationDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPLICATION_DATE"]));
			this.ApplicationPerson = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_PERSON"]));
			this.PromotionPerson = Convert.ToString(CommonFunctions.ToObject(dr["PROMOTION_PERSON"]));
			this.Reason = Convert.ToString(CommonFunctions.ToObject(dr["REASON"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedRemark = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }
		
		public HrPersonPositionApplicationEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.ApplicationId = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_ID"]));
			this.OriginalPosition = Convert.ToString(CommonFunctions.ToObject(dr["ORIGINAL_POSITION"]));
			this.ChangedPosition = Convert.ToString(CommonFunctions.ToObject(dr["CHANGED_POSITION"]));
			this.ApplicationDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPLICATION_DATE"]));
			this.ApplicationPerson = Convert.ToString(CommonFunctions.ToObject(dr["APPLICATION_PERSON"]));
			this.PromotionPerson = Convert.ToString(CommonFunctions.ToObject(dr["PROMOTION_PERSON"]));
			this.Reason = Convert.ToString(CommonFunctions.ToObject(dr["REASON"]));
			this.ApprovedDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["APPROVED_DATE"]));
			this.ApprovedBy = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_BY"]));
			this.ApprovedRemark = Convert.ToString(CommonFunctions.ToObject(dr["APPROVED_REMARK"]));
			this.Status = Convert.ToString(CommonFunctions.ToObject(dr["STATUS"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HrPersonPositionApplicationTable.Current;
            }
        }
		
		#region Perporty List
        public string ApplicationId
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_APPLICATION_ID)); }
            set { SetData(HrPersonPositionApplicationTable.C_APPLICATION_ID, value); }
        }
		
        public string OriginalPosition
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_ORIGINAL_POSITION)); }
            set { SetData(HrPersonPositionApplicationTable.C_ORIGINAL_POSITION, value); }
        }
		
        public string ChangedPosition
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_CHANGED_POSITION)); }
            set { SetData(HrPersonPositionApplicationTable.C_CHANGED_POSITION, value); }
        }
		
        public DateTime ApplicationDate
        {
            get { return Convert.ToDateTime(GetData(HrPersonPositionApplicationTable.C_APPLICATION_DATE)); }
            set { SetData(HrPersonPositionApplicationTable.C_APPLICATION_DATE, value); }
        }
		
        public string ApplicationPerson
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_APPLICATION_PERSON)); }
            set { SetData(HrPersonPositionApplicationTable.C_APPLICATION_PERSON, value); }
        }
		
        public string PromotionPerson
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_PROMOTION_PERSON)); }
            set { SetData(HrPersonPositionApplicationTable.C_PROMOTION_PERSON, value); }
        }
		
        public string Reason
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_REASON)); }
            set { SetData(HrPersonPositionApplicationTable.C_REASON, value); }
        }
		
        public DateTime ApprovedDate
        {
            get { return Convert.ToDateTime(GetData(HrPersonPositionApplicationTable.C_APPROVED_DATE)); }
            set { SetData(HrPersonPositionApplicationTable.C_APPROVED_DATE, value); }
        }
		
        public string ApprovedBy
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_APPROVED_BY)); }
            set { SetData(HrPersonPositionApplicationTable.C_APPROVED_BY, value); }
        }
		
        public string ApprovedRemark
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_APPROVED_REMARK)); }
            set { SetData(HrPersonPositionApplicationTable.C_APPROVED_REMARK, value); }
        }
		
        public string Status
        {
            get { return Convert.ToString(GetData(HrPersonPositionApplicationTable.C_STATUS)); }
            set { SetData(HrPersonPositionApplicationTable.C_STATUS, value); }
        }
		
		#endregion
	}
	
	
}	

